import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Router from 'vue-router'
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'

import axios from 'axios'
Vue.prototype.$http = axios

Vue.config.productionTip = false
Vue.use(Viewer)
Viewer.setDefaults({
  Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
})
// 解决vue-router重复点击报错问题
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location){
  return originalPush.call(this,location).catch(err=>err);
};

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
